/ Assembly List / LJCDBMessage / DbCommon / RequestLookupKeys

Namespace - LJCDBMessage


Parameters
dataObject - The data object.
baseDefinition - The Base DataDefinition columns.
propertyNames - The column property names.

Returns

The DbColumns object.

Syntax

C#
public static DbColumns RequestLookupKeys(Object dataObject, DbColumns baseDefinition, List<String> propertyNames = null)

Get Request Value Key columns from data properties for the specified column property names.

Remarks

Generally used in the Add() manager method to define the lookup keys columns and values to retrieve the row that was just added to the database. This allows for retrieving the database assigned values.

This method attempts to default the property names to the dataObject ChangedNames property if it exists and the propertyNames parameter has no values.

Creates a DbColumns collection of data definitions from the baseDefinition parameter whose PropertyName values match the names in the propertyNames parameter.

The dataObject property names must also match the names in the propertyNames parameter and the data value must not be null for the data definition to be included.

The DbColumn definitions include the dataObject value. The dataObject property values are retrieved using reflection.

A Key Column is not created if it is an AutoIncrement column, the value equals "0" or it is an invalid DateTime.

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.